home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 January: Mac OS SDK / Dev.CD Jan 00 SDK1.toast / Development Kits / Mac OS / QuickTime / QuickTime 3 Interfaces & Libs / QTDevWin / CIncludes / CMMComponent.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-21  |  7.9 KB  |  263 lines  |  [TEXT/dosa]

  1. /*
  2.      File:        CMMComponent.h
  3.  
  4.      Contains:    ColorSync CMM Component API
  5.  
  6.      Version:    Technology:    ColorSync 2.5
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __CMMCOMPONENT__
  19. #define __CMMCOMPONENT__
  20.  
  21. #ifndef __QUICKDRAW__
  22. #include <Quickdraw.h>
  23. #endif
  24. #ifndef __COMPONENTS__
  25. #include <Components.h>
  26. #endif
  27. #ifndef __CMAPPLICATION__
  28. #include <CMApplication.h>
  29. #endif
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53.  
  54. enum {
  55.     CMMInterfaceVersion            = 1
  56. };
  57.  
  58. /* Component function selectors */
  59. /* Required */
  60.  
  61. enum {
  62.     kCMMInit                    = 0,
  63.     kNCMMInit                    = 6,
  64.     kCMMMatchColors                = 1,
  65.     kCMMCheckColors                = 2
  66. };
  67.  
  68. /* Optional */
  69.  
  70. enum {
  71.     kCMMValidateProfile            = 8,
  72.     kCMMFlattenProfile            = 14,
  73.     kCMMUnflattenProfile        = 15,
  74.     kCMMMatchBitmap                = 9,
  75.     kCMMCheckBitmap                = 10,
  76.     kCMMMatchPixMap                = 3,
  77.     kCMMCheckPixMap                = 4,
  78.     kCMMConcatenateProfiles        = 5,
  79.     kCMMConcatInit                = 7,
  80.     kCMMNewLinkProfile            = 16,
  81.     kCMMGetPS2ColorSpace        = 11,
  82.     kCMMGetPS2ColorRenderingIntent = 12,
  83.     kCMMGetPS2ColorRendering    = 13,
  84.     kCMMGetPS2ColorRenderingVMSize = 17,
  85.     kCMMGetNamedColorInfo        = 70,
  86.     kCMMGetNamedColorValue        = 71,
  87.     kCMMGetIndNamedColorValue    = 72,
  88.     kCMMGetNamedColorIndex        = 73,
  89.     kCMMGetNamedColorName        = 74
  90. };
  91.  
  92.  
  93. EXTERN_API( CMError )
  94. NCMInit                            (ComponentInstance         CMSession,
  95.                                  CMProfileRef             srcProfile,
  96.                                  CMProfileRef             dstProfile)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0006, 0x7000, 0xA82A);
  97.  
  98. EXTERN_API( CMError )
  99. CMInit                            (ComponentInstance         CMSession,
  100.                                  CMProfileHandle         srcProfile,
  101.                                  CMProfileHandle         dstProfile)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0000, 0x7000, 0xA82A);
  102.  
  103. EXTERN_API( CMError )
  104. CMMatchColors                    (ComponentInstance         CMSession,
  105.                                  CMColor *                myColors,
  106.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x0001, 0x7000, 0xA82A);
  107.  
  108. EXTERN_API( CMError )
  109. CMCheckColors                    (ComponentInstance         CMSession,
  110.                                  CMColor *                myColors,
  111.                                  unsigned long             count,
  112.                                  long *                    result)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0002, 0x7000, 0xA82A);
  113.  
  114.  
  115. /* Optional functions */
  116. EXTERN_API( CMError )
  117. CMMValidateProfile                (ComponentInstance         CMSession,
  118.                                  CMProfileRef             prof,
  119.                                  Boolean *                valid)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
  120.  
  121. EXTERN_API( CMError )
  122. CMMFlattenProfile                (ComponentInstance         CMSession,
  123.                                  CMProfileRef             prof,
  124.                                  unsigned long             flags,
  125.                                  CMFlattenUPP             proc,
  126.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x000E, 0x7000, 0xA82A);
  127.  
  128. EXTERN_API( CMError )
  129. CMMUnflattenProfile                (ComponentInstance         CMSession,
  130.                                  FSSpec *                resultFileSpec,
  131.                                  CMFlattenUPP             proc,
  132.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x000F, 0x7000, 0xA82A);
  133.  
  134. EXTERN_API( CMError )
  135. CMMatchBitmap                    (ComponentInstance         CMSession,
  136.                                  const CMBitmap *        bitmap,
  137.                                  CMBitmapCallBackUPP     progressProc,
  138.                                  void *                    refCon,
  139.                                  CMBitmap *                matchedBitmap)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x0009, 0x7000, 0xA82A);
  140.  
  141. EXTERN_API( CMError )
  142. CMCheckBitmap                    (ComponentInstance         CMSession,
  143.                                  const CMBitmap *        bitmap,
  144.                                  CMBitmapCallBackUPP     progressProc,
  145.                                  void *                    refCon,
  146.                                  CMBitmap *                resultBitmap)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x000A, 0x7000, 0xA82A);
  147.  
  148. EXTERN_API( CMError )
  149. CMMatchPixMap                    (ComponentInstance         CMSession,
  150.                                  PixMap *                myPixMap,
  151.                                  CMBitmapCallBackUPP     progressProc,
  152.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0003, 0x7000, 0xA82A);
  153.  
  154. EXTERN_API( CMError )
  155. CMCheckPixMap                    (ComponentInstance         CMSession,
  156.                                  const PixMap *            myPixMap,
  157.                                  CMBitmapCallBackUPP     progressProc,
  158.                                  BitMap *                myBitMap,
  159.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x0004, 0x7000, 0xA82A);
  160.  
  161. EXTERN_API( CMError )
  162. CMConcatInit                    (ComponentInstance         CMSession,
  163.                                  CMConcatProfileSet *    profileSet)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
  164.  
  165. EXTERN_API( CMError )
  166. CMNewLinkProfile                (ComponentInstance         CMSession,
  167.                                  CMProfileRef *            prof,
  168.                                  const CMProfileLocation * targetLocation,
  169.                                  CMConcatProfileSet *    profileSet)                            FIVEWORDINLINE(0x2F3C, 0x000C, 0x0010, 0x7000, 0xA82A);
  170.  
  171. EXTERN_API( CMError )
  172. CMMGetPS2ColorSpace                (ComponentInstance         CMSession,
  173.                                  CMProfileRef             srcProf,
  174.                                  unsigned long             flags,
  175.                                  CMFlattenUPP             proc,
  176.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x000B, 0x7000, 0xA82A);
  177.  
  178. EXTERN_API( CMError )
  179. CMMGetPS2ColorRenderingIntent    (ComponentInstance         CMSession,
  180.                                  CMProfileRef             srcProf,
  181.                                  unsigned long             flags,
  182.                                  CMFlattenUPP             proc,
  183.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x000C, 0x7000, 0xA82A);
  184.  
  185. EXTERN_API( CMError )
  186. CMMGetPS2ColorRendering            (ComponentInstance         CMSession,
  187.                                  CMProfileRef             srcProf,
  188.                                  CMProfileRef             dstProf,
  189.                                  unsigned long             flags,
  190.                                  CMFlattenUPP             proc,
  191.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0014, 0x000D, 0x7000, 0xA82A);
  192.  
  193. EXTERN_API( CMError )
  194. CMMGetPS2ColorRenderingVMSize    (ComponentInstance         CMSession,
  195.                                  CMProfileRef             srcProf,
  196.                                  CMProfileRef             dstProf,
  197.                                  unsigned long *        vmSize)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0011, 0x7000, 0xA82A);
  198.  
  199. EXTERN_API( CMError )
  200. CMConcatenateProfiles            (ComponentInstance         CMSession,
  201.                                  CMProfileHandle         thru,
  202.                                  CMProfileHandle         dst,
  203.                                  CMProfileHandle *        newDst)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0005, 0x7000, 0xA82A);
  204.  
  205. /* Named Color functions */
  206. EXTERN_API( CMError )
  207. CMMGetNamedColorInfo            (ComponentInstance         CMSession,
  208.                                  CMProfileRef             srcProf,
  209.                                  unsigned long *        deviceChannels,
  210.                                  OSType *                deviceColorSpace,
  211.                                  OSType *                PCSColorSpace,
  212.                                  unsigned long *        count,
  213.                                  StringPtr                 prefix,
  214.                                  StringPtr                 suffix)                                FIVEWORDINLINE(0x2F3C, 0x001C, 0x0046, 0x7000, 0xA82A);
  215.  
  216. EXTERN_API( CMError )
  217. CMMGetNamedColorValue            (ComponentInstance         CMSession,
  218.                                  CMProfileRef             prof,
  219.                                  StringPtr                 name,
  220.                                  CMColor *                deviceColor,
  221.                                  CMColor *                PCSColor)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x0047, 0x7000, 0xA82A);
  222.  
  223. EXTERN_API( CMError )
  224. CMMGetIndNamedColorValue        (ComponentInstance         CMSession,
  225.                                  CMProfileRef             prof,
  226.                                  unsigned long             index,
  227.                                  CMColor *                deviceColor,
  228.                                  CMColor *                PCSColor)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x0048, 0x7000, 0xA82A);
  229.  
  230. EXTERN_API( CMError )
  231. CMMGetNamedColorIndex            (ComponentInstance         CMSession,
  232.                                  CMProfileRef             prof,
  233.                                  StringPtr                 name,
  234.                                  unsigned long *        index)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0049, 0x7000, 0xA82A);
  235.  
  236. EXTERN_API( CMError )
  237. CMMGetNamedColorName            (ComponentInstance         CMSession,
  238.                                  CMProfileRef             prof,
  239.                                  unsigned long             index,
  240.                                  StringPtr                 name)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x004A, 0x7000, 0xA82A);
  241.  
  242.  
  243. #if PRAGMA_STRUCT_ALIGN
  244.     #pragma options align=reset
  245. #elif PRAGMA_STRUCT_PACKPUSH
  246.     #pragma pack(pop)
  247. #elif PRAGMA_STRUCT_PACK
  248.     #pragma pack()
  249. #endif
  250.  
  251. #ifdef PRAGMA_IMPORT_OFF
  252. #pragma import off
  253. #elif PRAGMA_IMPORT
  254. #pragma import reset
  255. #endif
  256.  
  257. #ifdef __cplusplus
  258. }
  259. #endif
  260.  
  261. #endif /* __CMMCOMPONENT__ */
  262.  
  263.